﻿@model IQueryable<MMITDomain.Entities.Transaction>

@{
    ViewBag.Title = "Reports";
}
<div id="page" class="container">
<h2>Reports</h2>

@(Html.Telerik().Grid(Model).Name("Transactions")
                              .Groupable(grouping => grouping
                              .Groups(groups =>
                              {
                                  //Group by Transaction Types...
                                  groups.Add(c => c.TransactionType.Name);
                              }))
                            .DataKeys(keys => keys.Add(o => o.Id))
                            .Columns(
                                    columns =>
                                    {
                                        columns.Bound(o => o.TransactionCode).Title("TransactionRef");
                                        columns.Bound(o => o.TransactionType.Name).Title("Transaction Type");
                                        columns.Bound(o => o.Amount).Title("Amount");
                                        columns.Bound(o => o.Sender.Currency.Name).Title("Currency");
                                        columns.Bound(o => o.Recipient.Name).Title("Recipient");
                                        columns.Bound(o => o.TimeInitiated).Title("Transaction Date");
                                        columns.Bound(o => o.coreStatus).Title("Status");
                                    }
                            )
                            .Pageable(pageable => pageable.Enabled(true))
                            .Filterable(filterable => filterable.Enabled(true))
                            .Groupable(groupable => groupable.Enabled(true))
                            .Footer(true)
                            
    )

    </div>